import { Router } from 'hyper-express';
import requireUser from '../../../middlewares/auth/requireUser';
import cache from '../../../middlewares/cache';
import rowLevelPermission from '../../../middlewares/auth/rowLevelPermission';
//#region AutoCreateCode
import { uctooGroupTagController } from '../../../controllers';
const uctoogroupTagRouter = new Router();
const groupTagController = new uctooGroupTagController();

uctoogroupTagRouter.post('/add', requireUser, groupTagController.add);
uctoogroupTagRouter.post('/edit', requireUser, rowLevelPermission('uctoo/group_tag'), groupTagController.edit);
uctoogroupTagRouter.post('/del', requireUser, rowLevelPermission('uctoo/group_tag'), groupTagController.delete);

//For getting groupTag with permission control
uctoogroupTagRouter.get('/:id', requireUser,  rowLevelPermission('uctoo/group_tag'), groupTagController.getSingle);
uctoogroupTagRouter.get('/:limit/:page', requireUser,  rowLevelPermission('uctoo/group_tag'), groupTagController.getMany);
uctoogroupTagRouter.get('/:limit/:page/:skip', requireUser,  rowLevelPermission('uctoo/group_tag'), groupTagController.getMany);

//#endregion AutoCreateCode
export default uctoogroupTagRouter;
